package main

import (
	"fmt"
	"math"
)

func main() {
	area := 122122
	fmt.Println(constructRectangle(area))
}

//#link: https://leetcode-cn.com/problems/construct-the-rectangle/
func constructRectangle(area int) (ans []int) {
	w := int(math.Sqrt(float64(area)))
	for area%w != 0 {
		w--
	}
	ans = append(ans, area/w, w)
	return ans
}
